<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: include/mdf/samplerecord.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_dea88a92c3ac1d8c329848683c200b71.html">mdf</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">samplerecord.h</div></div>
</div><!--header-->
<div class="contents">
<a href="samplerecord_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2021 Ingemar Hedvall</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * SPDX-License-Identifier: MIT</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> */</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;cstddef&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemdf.html">mdf</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span> </div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="};">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html">   20</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structmdf_1_1_sample_record.html">SampleRecord</a> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#a8b95d4a965339e190d873305e5ee9436">   21</a></span>  uint64_t <a class="code hl_variable" href="structmdf_1_1_sample_record.html#a8b95d4a965339e190d873305e5ee9436">timestamp</a> = 0;  </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#af298a995943efd1cef68c32aacc69444">   22</a></span>  uint64_t <a class="code hl_variable" href="structmdf_1_1_sample_record.html#af298a995943efd1cef68c32aacc69444">record_id</a> = 0;  </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#acc9e4df105c20814c2b6212284eb5a71">   23</a></span>  std::vector&lt;uint8_t&gt; <a class="code hl_variable" href="structmdf_1_1_sample_record.html#acc9e4df105c20814c2b6212284eb5a71">record_buffer</a>;  </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#a83ddac95b1f8a3f9e6ecfdc65d3a500c">   24</a></span>  <span class="keywordtype">bool</span> <a class="code hl_variable" href="structmdf_1_1_sample_record.html#a83ddac95b1f8a3f9e6ecfdc65d3a500c">vlsd_data</a> = <span class="keyword">false</span>; </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#a4a63f6a32a636d7d68a4718b481e4aec">   25</a></span>  std::vector&lt;uint8_t&gt; <a class="code hl_variable" href="structmdf_1_1_sample_record.html#a4a63f6a32a636d7d68a4718b481e4aec">vlsd_buffer</a>; </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="foldopen" id="foldopen00028" data-start="{" data-end="}">
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="structmdf_1_1_sample_record.html#acb61e4e3dd2cb346638cd28a9b738963">   28</a></span>  [[nodiscard]] <span class="keywordtype">size_t</span> <a class="code hl_function" href="structmdf_1_1_sample_record.html#acb61e4e3dd2cb346638cd28a9b738963">SampleSize</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    <span class="keywordflow">return</span> <a class="code hl_variable" href="structmdf_1_1_sample_record.html#acc9e4df105c20814c2b6212284eb5a71">record_buffer</a>.size() + <a class="code hl_variable" href="structmdf_1_1_sample_record.html#a4a63f6a32a636d7d68a4718b481e4aec">vlsd_buffer</a>.size();</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>  }</div>
</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>};</div>
</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>}  <span class="comment">// namespace mdf</span></div>
<div class="ttc" id="anamespacemdf_html"><div class="ttname"><a href="namespacemdf.html">mdf</a></div><div class="ttdoc">Main namespace for the MDF library.</div><div class="ttdef"><b>Definition</b> canmessage.h:17</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html"><div class="ttname"><a href="structmdf_1_1_sample_record.html">mdf::SampleRecord</a></div><div class="ttdoc">Simple record buffer structure.</div><div class="ttdef"><b>Definition</b> samplerecord.h:20</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_a4a63f6a32a636d7d68a4718b481e4aec"><div class="ttname"><a href="structmdf_1_1_sample_record.html#a4a63f6a32a636d7d68a4718b481e4aec">mdf::SampleRecord::vlsd_buffer</a></div><div class="ttdeci">std::vector&lt; uint8_t &gt; vlsd_buffer</div><div class="ttdoc">VLSD record buffer.</div><div class="ttdef"><b>Definition</b> samplerecord.h:25</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_a83ddac95b1f8a3f9e6ecfdc65d3a500c"><div class="ttname"><a href="structmdf_1_1_sample_record.html#a83ddac95b1f8a3f9e6ecfdc65d3a500c">mdf::SampleRecord::vlsd_data</a></div><div class="ttdeci">bool vlsd_data</div><div class="ttdoc">True if the vlsd_buffer holds data.</div><div class="ttdef"><b>Definition</b> samplerecord.h:24</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_a8b95d4a965339e190d873305e5ee9436"><div class="ttname"><a href="structmdf_1_1_sample_record.html#a8b95d4a965339e190d873305e5ee9436">mdf::SampleRecord::timestamp</a></div><div class="ttdeci">uint64_t timestamp</div><div class="ttdoc">Nanosecond since midnight 1970-01-01 UTC.</div><div class="ttdef"><b>Definition</b> samplerecord.h:21</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_acb61e4e3dd2cb346638cd28a9b738963"><div class="ttname"><a href="structmdf_1_1_sample_record.html#acb61e4e3dd2cb346638cd28a9b738963">mdf::SampleRecord::SampleSize</a></div><div class="ttdeci">size_t SampleSize() const</div><div class="ttdoc">Returns the size of a record buffer.</div><div class="ttdef"><b>Definition</b> samplerecord.h:28</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_acc9e4df105c20814c2b6212284eb5a71"><div class="ttname"><a href="structmdf_1_1_sample_record.html#acc9e4df105c20814c2b6212284eb5a71">mdf::SampleRecord::record_buffer</a></div><div class="ttdeci">std::vector&lt; uint8_t &gt; record_buffer</div><div class="ttdoc">Record buffer (fixed size).</div><div class="ttdef"><b>Definition</b> samplerecord.h:23</div></div>
<div class="ttc" id="astructmdf_1_1_sample_record_html_af298a995943efd1cef68c32aacc69444"><div class="ttname"><a href="structmdf_1_1_sample_record.html#af298a995943efd1cef68c32aacc69444">mdf::SampleRecord::record_id</a></div><div class="ttdeci">uint64_t record_id</div><div class="ttdoc">Unique record ID within the data group.</div><div class="ttdef"><b>Definition</b> samplerecord.h:22</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
